import Vue from 'vue'
import VueRouter from 'vue-router'
import MovieView from '../views/MovieView.vue'
import CinimeView from '../views/CinimeView.vue'
import MineView from '../views/MineView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'cinime',
    component: MineView
  },{
    path: '/movie',
    name: 'movie',
    component: MovieView,
    children:[{
      path:'city',
      component: () => import('@/components/City.vue')
    },{
      path:'now',
      component: () => import('@/components/Now.vue')
    },{
      path:'coming',
      component: () => import('@/components/Coming.vue')
    },{
      path:'search',
      component: () => import('@/components/Search.vue')
    },]
  },{
    path: '/cinime',
    name: 'cinime',
    component: CinimeView
  },{
    path: '/mine',
    name: 'mine',
    component: MineView
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
